<include file="public@header" />
</head>
<body>
	<div class="wrap js-check-wrap">		
		<form class="well form-inline margin-top-20" method="post" action="{:url('Finance/added')}">
            订单号:
        <input type="text" class="form-control" name="orderNo" id="orderNo" style="width: 120px;" value="" placeholder="订单号">
            会员名称:
        <input type="text" class="form-control" name="mname" id="mname" style="width: 120px;" value="" placeholder="会员名">
  
         店铺列表：
        <select class="form-control" name="storeid" style="width: 140px;" id="storeid">        	
	   	   <foreach name='list_store_list' item='vl' key='kl'>
	       <option value='{$vl.id}'>{$vl.store_name}</option> 
	       </foreach>
   		</select> 
        时间:
        <input type="text" class="form-control js-bootstrap-datetime" name="start_time" id="start_time" value="{$start_time|default=''}" style="width: 140px;" autocomplete="off">-
        <input type="text" class="form-control js-bootstrap-datetime" name="end_time"   id="end_time" value="{$end_time|default=''}" style="width: 140px;" autocomplete="off"> &nbsp; &nbsp;         
        <input type="submit" class="btn btn-primary" value="搜索" />
        <a class="btn btn-danger" href="{:url('Finance/added')}">清空</a>
        <!-- <a title="数据导出" onclick="exportdata()" id="export" class="btn btn-success" style="margin-left: 10px;">数据导出</a> -->
        </form>
		<table class="table table-hover table-bordered">
			<thead>
				<tr>
					<th width="40">ID</th>
					<th align="left">订单号</th>
					<th align="left">会员</th>					
					<th align="left">变更数量</th>
					<th align="left">收银员</th>
					<th align="left">店铺</th>
					<th align="left">时间</th>										
					<!-- <th width="160">状态</th> -->
				</tr>
			</thead>
			<tbody>
				<foreach name="list" item="vo">
					<tr>
						<td>{$vo.id}</td>
						<td>{$vo.orderid}</td>
						<td>{:get_member_data($vo['userid'],'uname')}</td>
						<td><if condition="$vo['money'] gt 0"><span style="color:#14c314;font-size:18px;">{$vo.money}</span><else/><span style="color:red;font-size:18px;">{$vo.money}</span></if></td>
						<td>{:get_operator_data($vo['operatorid'],'user_login')}</td>
						<td>{:get_store_data($vo['storeid'],'store_name')}</td>
						<td>{$vo.ctime|time_format}</td>
					</tr>
				</foreach>
			</tbody>
		</table>
		<div class="pagination">{$page}</div>
	</div>	
	<script>
function exportdata()
{
	var orderNo=$("#orderNo").val();
	var cardid=$("#cardid").val();
	var starttime=$("#start_time").val();
	var endtime=$("#end_time").val();
	var storeid=$("#storeid").val();
	//location="{:url('Order/importData',array('orderNo'=>"+orderNo+",'cardid'=>"+cardid+",'starttime'=>"+starttime+",'endtime'=>"+endtime+"))}";			
	//location="./importData/orderNo/"+orderNo+"/cardid/"+cardid+"/starttime/"+starttime+"/endtime/"+endtime;
	location="./importData?orderNo="+orderNo+"&cardid="+cardid+"&starttime="+starttime+"&endtime="+endtime+"&storeid="+storeid;
}
</script>  
	<script src="__STATIC__/js/admin.js"></script>
</body>
</html>